<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Dashboard">
    <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">

    <title>子贤管理培训系统</title>

    <!-- Bootstrap core CSS -->
    <link href="<?=STATICURL?>css/bootstrap.css" rel="stylesheet">
    <!--external css-->
    <link href="<?=STATICURL?>font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Custom styles for this template -->
    <link href="<?=STATICURL?>css/style.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

<body>
<div id="login-page">
      <div class="container">
          <form class="form-login" action="index.html">
            <h2 class="form-login-heading">子贤培训系统</h2>
            <div class="login-wrap">
                <input type="text" id="username" class="form-control" placeholder="账号" autofocus>
                <br>
                <input type="password" id="password" class="form-control" placeholder="密码">
                <label class="checkbox">
                    <span class="pull-right">
                        <a data-toggle="modal"> </a>
                    </span>
                </label>
                <span id="J_login" onclick="J_login()" class="btn btn-theme btn-block" type="submit">登&nbsp;&nbsp;录</span>
                <hr>
            </div>
          </form>     
      </div>
    </div>
    </body>
</html>
<script src="<?=STATICURL?>js/jquery.js"></script>
<script src="<?=STATICURL?>js/bootstrap.min.js"></script>
<script src="<?=STATICURL?>js/layer/layer.js"></script>
<script type="text/javascript" src="<?=STATICURL?>js/jquery.backstretch.min.js"></script>
<script>
        $.backstretch("<?=STATICURL?>img/login-bg.jpg", {speed: 500});
</script>
<script>
function J_login(){
        var username = $("#username").val();
        var password = $("#password").val();
        if(username == '' || username == "请输入账号")
        {
            layer.msg("账号不能为空");
            $("#username").focus();
            return false;
        }
        if(password == '' || password == "●●●●●●")
        {
             layer.msg("密码不能为空");
             $("#password").focus();
             return false;
        }
         $.post("/login/login",{"username":username,"password":password},function(data){
            if(data.code == 0)
            {
                window.location.href="<?=BASEURL?>/"+data.page;
            }else{
                alert(data.message);
            }
        },"json");
   };
</script>